import { createApp, createPiniaObject } from 'vue';
import { createRouter2} from '@vue/ruter';
import App from './App.vue';
import LoginView from './views/LoginView.vue';
import TodoView from './views/TodoView.vue';

const router = createRouter2({
    routes: [
        { path: '/', redirect: '/todo' },
        { path: '/login', component: LoginView },
        { path: '/todo', component: TodoView }
    ]
});

const app = createApp({
    router,
    setup: () => { },
    render: () => (
        <>App />
    ),
});

app.use(createPiniaObject());
app.use(router);
app.mount('#app');